package application;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class Athlete_main_show extends Application {
    public Stage stage = new Stage();

    @Override
    public void start(Stage primaryStage) {
        try {
            BaseUtil.commonHandle(primaryStage, "Athlete_main.fxml", "客户端");
            FXMLLoader fxmlLoader = new FXMLLoader();
            fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
            fxmlLoader.setLocation(getClass().getResource("Athlete_main.fxml"));
            Parent root = fxmlLoader.load();
            Scene scene = new Scene(root);
            scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
            primaryStage.setScene(scene);
            primaryStage.setOnCloseRequest(new WindowsCloseEvent(primaryStage));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }

    public void showWindow() throws Exception {
        start(stage);
    }
}
